<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <META HTTP-EQUIV="pragma" CONTENT="no-cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
    <META HTTP-EQUIV="expires" CONTENT="0">
    <title></title>
    <script type="text/javascript" src="../../js/commonCss.js"></script>
    <link rel="stylesheet" type="text/css" href="../../styles/common.css" />
</head>
<body>
<form class="form-inline definewidth m20 " role="form">
    <div class="form-group w200 mb10">
        <div class="input-group">
            <div class="input-group-addon">开始时间</div>
            <input type="text" class="form-control" value="" id="datetimepicker">
        </div>
    </div>
    <div class="form-group w200 mb10">
        <div class="input-group">
            <div class="input-group-addon">结束时间</div>
            <input type="text" class="form-control" value="" id="datetimepicker2">
        </div>
    </div>
    <div class="form-group w200 mb10">
        <div class="input-group">
            <div class="input-group-addon">项目编号</div>
            <input type="text" name="project_code" class="form-control" id="project_code" placeholder="" value="">
        </div>
    </div>
    <div class="form-group w200 mb10">
        <div class="input-group">
            <div class="input-group-addon">项目名称</div>
            <input type="text" name="project_name" class="form-control" id="project_name" placeholder="" value="">
        </div>
    </div>
    <div class="form-group w200 mb10">
        <div class="input-group">
            <div class="input-group-addon">项目状态</div>
            <select name="project_status" class="form-control" id="project_status" >
            </select>
        </div>
    </div>

    <div class="form-group mb10">
        <button type="button" class="btn btn-primary" id="search">查询</button>
    </div>
</form>
<div class="definewidth">

    <button type="button" class="btn btn-default" id="refleshList">刷新列表</button>
    <table id="table" class="table table-bordered table-hover definewidth m10"></table>
</div>

<script src="../../js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="../../libs/bootstrap-3.3.0/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../libs/bootstrap-table/bootstrap-table.min.js"></script>
<script type="text/javascript" src="../../libs/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript" src="../../libs/bootstrap-datepicker/bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="../../libs/bootstrap-datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<script type="text/javascript" src="../../js/common.js"></script>
<script type="text/javascript" src="../../js/formatTime.js"></script>
<script type="text/javascript" src="../../scripts/ProjectExecute/list.js"></script>
<script type="text/javascript">
    document.onkeydown=function(event){
        var e = event || window.event || arguments.callee.caller.arguments[0];
        if(e && e.keyCode==13){ // enter 键
            document.getElementById('search').click();
            return false;
        }
    };
    $(function () {
        $('#datetimepicker').datepicker({
            language: 'zh-CN',
            format: 'yyyy-mm-dd',
            autoclose:true
        });
        $('#datetimepicker2').datepicker({
            language: 'zh-CN',
            format: 'yyyy-mm-dd',
            autoclose:true
        });
        $.ajax({
            type: "POST",
            url: ctx + "/parameter/queryByParameterType",
            data:{
                parameterType: 'projectState'
            },
            success: function(data){
                if(data.code == 200){
                    SetStatus(data.list)
                }
            }
        });
        var SetStatus = function(param){
            var html = '';
            html +='<option value="-1">请选择</option>';
            for (var i =0;i<param.length;i++){
                html +='<option value="'+ param[i].paramId +'">'+ param[i].paramName +'</option>';
            }
            $("#project_status").append(html);
        }
    });
</script>
</body>
</html>